{# base.html.twig #}
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

{#<script type="text/javascript" src="{{asset('bundles/theme/js/jQuery.min.js')}}"> </script>#}
        <script src="{{asset('bundles/theme/js/jquery-ui-1.10.3.custom/js/jquery-1.9.1.js')}}" type="text/javascript" ></script>        
        <script src="{{asset('bundles/theme/js/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.js')}}" type="text/javascript" ></script>
        <script src="{{asset('bundles/theme/js/bootstrap.min.js')}}" type="text/javascript" ></script>
        <script src="{{asset('bundles/theme/js/jquery.blockUI.js')}}" type="text/javascript" ></script>

        <link href="{{asset('bundles/theme/css/estilo.css')}}" rel="stylesheet" type="text/css" />
        <link href="{{asset('bundles/theme/css/united/bootstrap.min.css')}}" rel="stylesheet" type="text/css" />
        <link href="{{asset('bundles/theme/css/menu.css')}}" rel="stylesheet" type="text/css" />
        <link type="text/css" href="{{asset('bundles/theme/js/jquery-ui-1.10.3.custom/css/ui-lightness/jquery-ui-1.10.3.custom.css')}}" rel="Stylesheet" />
        {% block stylesheets %}
        {% endblock %}     
        {% block javascripts %}
        {% endblock %}

        {#<script type="text/javascript" src="{{asset('bundles/theme/js/menu.js')}}"></script>#}
        {% block head %}{% endblock %}
        {% if form is defined %}
        {% form_theme form 'ThemeBundle:Default:forms_rows.html.twig' %}
        {%endif%}
        <title>Bolsa de Pasantías</title>
    </head>

    <body>
        {% set usuario = app.user %}
        {% if is_granted('ROLE_ADMIN') %}
            {% set usuario ={
                'username': 'Administrador del Sistema',
                'role':'ROLE_ADMIN'
            } %}
        {% endif %}

        {{ include('ThemeBundle:Default:menuSuperior.html.twig') }}

        <div class="container">

            <div class="bs-docs-section clearfix">
                
            {% block contenido %}
                {% for flashMessage in app.session.flashbag.get('success') %}
                <div class="alert alert-dismissable alert-success">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                      {{ flashMessage }}
                </div>

                {% endfor %}
                {% for flashMessage in app.session.flashbag.get('error') %}
                <div class="alert alert-dismissable alert-danger">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                      {{ flashMessage }}
                </div>

                {% endfor %}
                
                {% for flashMessage in app.session.flashbag.get('warning') %}
                <div class="alert alert-dismissable alert-warning">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                      {{ flashMessage }}
                </div>

                {% endfor %}

            {% endblock %}
                   
            </div>
        </div>
        <div id="footer">
            <script>
                $(document).ready(function() {


                    $('.tooltipOn').tooltip();
                    $(document).on('focusin', '.date', function(e) {
{#                    $(".date").datepicker({#}
                        $(this).datepicker({
                            dateFormat: "dd-mm-yy",
                            dayNamesMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"],
                            monthNames: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
                            monthNamesShort: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
                            yearRange: "-100:+0",
                            changeMonth: true,
                            changeYear: true,
                            showOtherMonths: true,
                            selectOtherMonths: true,
                            nextText: "Siguiente",
                            prevText: "Anterior",
                            showAnim: "slideDown"
                        });
{#                        $(this).datepicker("option", "showAnim", 'slideDown');#}
                    });

                    $(function() {

                        $('#sidebar nav li a').click(function(event) {
                            var elem = $(this).next();
                            if (elem.is('#sidebar ul')) {
                                event.preventDefault();
                                $('#sidevar nav ul:visible').not(elem).slideUp();
                                elem.slideToggle();
                            }
                        });
                    });

                    $(document).ajaxStart(function() {
                        $.blockUI(
                                {message: '<img src="{{ asset('bundles/theme/images/ajax-loader.gif') }}">',
                                    css: {backgroundColor: 'none', border: 'none'}
                                }
                        )
                    });
                    $(document).ajaxStop($.unblockUI);
                })
            </script>

            "Bolsa de pasantias"
        </div>


    </body>
</html>
